﻿<%@ Page Title="Academic Research Explorer" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
  CodeBehind="Default.aspx.vb" Inherits="myproject._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

    <style type="text/css">
        .style3
        {
            height: 81px;
        }
        .style4
        {
            height: 57px;
        }
    </style>
</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
 
    
<!-- This place holder tag is to adding suitable stuff for suitable users "adding roles!" 

You can add any asp.net tag here, as long as active users or normal users need them -->

<asp:PlaceHolder runat="server" ID="ph_activeUsers">

Hey, You are Active User!

</asp:PlaceHolder>


             <br />
             <div align="left" lang="en">
      <table>
         <tr>
         <td>
           <div class="searchbox">
             <table width="500" cellspacing="30" cellpadding="0" >
             <tr>
             <td valign="middle">
             <h2 align="center" runat="server"> </h2>
             </td>
             </tr>
             <tr>
             <td>
             <asp:TextBox runat="server" Width="550" Height ="50" ID="Search" Font-Size="X-Large">
             </asp:TextBox>
             </td>
             </tr>
             <tr align="center">
             <td>
             <asp:Button ID="btn_search" runat="server" Text="Search" Height="38px" Width="183px" Font-Bold="true" Font-Size="Large" />
             </td>
             </tr>
             </table>
           </div>
           
           <br />
           <br />

           <div>
             <table width="500" cellspacing="30" style="border-bottom-style: groove">
             <tr align="center">
             <td valign="middle">
             <h1 style="border-bottom-style: groove">Highlights</h1>
             <br />
                   <p>Here you can see the newest research published so far!</p>
             </td>
             </tr>
             <tr>
             <td>
       
                 <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                     DataSourceID="HighlightsDataSource" Height ="70px" Width ="500px">
                     <Columns>
                         <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                         <asp:BoundField DataField="Description" HeaderText="Description" 
                             SortExpression="Description" />
                     </Columns>
                                 <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
        <SortedAscendingCellStyle BackColor="#F4F4FD" />
        <SortedAscendingHeaderStyle BackColor="#5A4C9D" />
        <SortedDescendingCellStyle BackColor="#D8D8F0" />
        <SortedDescendingHeaderStyle BackColor="#3E3277" />
                 </asp:GridView>
                 <asp:SqlDataSource ID="HighlightsDataSource" runat="server" 
                     ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                     ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                     SelectCommand="SELECT [ID], [Title], [Description] FROM [Researches] WHERE ID=(SELECT MAX(ID) FROM Researches)">
                 </asp:SqlDataSource>
                 <br />
                 
             </td>

             </tr>
             <tr align="center">
             <td>
             <p>To see all researches available<asp:HyperLink ID="hl_allResearches" runat="server" NavigateUrl="~/ResearchList.aspx">click here</asp:HyperLink></p>
                 <p></p>
    <br />
             </td>
             </tr>
             </table>
            </div>

           </div>
         </td>
         <td>

             <table width="250" cellspacing="30" style="border-style: groove">
             <tr>
             <td>
             </td>
             </tr>
             <tr>
             <td align ="center">
             
             <h1 style="border-bottom-style: groove">Active Users</h1>
             <br />
                 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                     DataSourceID="NumberOfCommentsDataSource" Font-Bold ="true" BorderWidth="2px" >
                     <Columns>
                         <asp:BoundField DataField="Author" HeaderText="User Name" 
                             SortExpression="Author" >
                         <ControlStyle BorderStyle="Dotted" />
                         </asp:BoundField>
                         <asp:BoundField DataField="NumberOfComments" HeaderText="Number of Comments" 
                             SortExpression="NumberOfComments" />
                     </Columns>
                                 <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
        <SortedAscendingCellStyle BackColor="#F4F4FD" />
        <SortedAscendingHeaderStyle BackColor="#5A4C9D" />
        <SortedDescendingCellStyle BackColor="#D8D8F0" />
        <SortedDescendingHeaderStyle BackColor="#3E3277" />
                 </asp:GridView>
                 <asp:SqlDataSource ID="NumberOfCommentsDataSource" runat="server" 
                     ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                     ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT Top 4 [Author], [NumberOfComments] FROM [NumberOfComments] WHERE NumberOfComments &gt; 2
ORDER BY NumberOfComments DESC"></asp:SqlDataSource>
             
             
             </td>
             </tr>
             <tr>
             <td>
             </td>
             </tr>
             <tr>
             <td align ="center">
             <h1 style="border-bottom-style: groove">Calender</h1>
             <br />

                 <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
                     BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" 
                     DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" 
                     ForeColor="#003399" Height="200px" Width="220px">
                     <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                     <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                     <OtherMonthDayStyle ForeColor="#999999" />
                     <SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                     <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                     <TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" 
                         Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
                     <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                     <WeekendDayStyle BackColor="#CCCCFF" />
                 </asp:Calendar>
             <br />
             </td>
             
             </tr> 
             <tr align ="center">
             <td class="style3">
             <h1 style="border-bottom-style: groove">Statistics</h1>
             <br />
            <br />
             <asp:HyperLink ID="hl_statistics" runat="server" 
        NavigateUrl="~/Statistics.aspx">To see all statistics please click here</asp:HyperLink>
    <br />   
            <br />
            </td>
             </tr>
             </table>
         </td>
         </tr>
     </table>
     <br />
             </div>
             
             <div>
         <table>
         <tr>
         <td>
         </td>
         <td>
         </td>
         </tr>
     </table>
             </div>
   

</asp:Content>
